package cn.wht.deal;

import java.util.Iterator;
import java.util.Map;

import cn.wht.enginee.ParseEnginee;

/**
 * @Author: haoting.wang
 * @Date: Created in 上午11:26 2017/6/16
 */
public class MyDealTask extends DealTask {

    @Override
    public void handle(Map data) throws InterruptedException {
        if (data == ParseEnginee.DUMMY) {
            queue.put(data);
            setDone();
        } else {
            for (Iterator it = data.keySet().iterator(); it.hasNext();) {
                String key = String.valueOf(it.next());
                System.out.print(Thread.currentThread().getName() + "import:>>>[" + key + "]:[" + data.get(key)
                                 + "];\t");
            }
            System.out.println("\n");
        }
    }

}
